<template>
  <div id="app">
    <button @click="go">跳转</button>
    <button @click="set">存储</button>
    <div>{{ a }}</div>
    <div>{{ b }}</div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      a: localStorage.getItem('a'),
      b: sessionStorage.getItem('b')
    };
  },
  computed: {},
  mounted() {},
  methods: {
    go() {
      window.location.href = 'http://192.168.43.145:8081/';
    },
    set() {
      localStorage.setItem('a', 'local');
      this.a = localStorage.getItem('a');
      sessionStorage.setItem('b', 'session');
      this.b = sessionStorage.getItem('b');
    }
  }
};
</script>
<style lang="less">
@import url('@/styles/reset.less');
#app {
  // background: @theme-bg-color;
  display: flex;
  flex-direction: column;
}
</style>
